<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vertical</title>
</head>
<body>
    <script>
        //事件委托模式
        const menu = document.querySelector('.menu');
        menu.addEventListener("click",(event)=>{
            const menuItem = event.target.closest(".has-sub-menu");
            if(!menuItem)return;
            if(!menu.contains(menuItem))return;

            const subMenu = menuItem.querySelector(".sub-menu");
            const 
        }
    </script>
</body>
</html>